package com.example.myaccounting.fragment.fragment_04;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.example.myaccounting.R;

/**
 * Created by 啦啦啦 on 2018/11/21.
 */

public class Fragme_04 extends Fragment {
    private View view;
    private RelativeLayout rl_bb,rl_tc,rl_top;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        view =inflater.inflate(R.layout.fragme_04,container,false);
        setViews();
        setListeners();
        return view;
    }

    private void setListeners() {
        rl_bb.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                AlertDialog alertDialog=new AlertDialog.Builder(getActivity())
                        .setTitle("版本信息")
                        .setMessage("小本本V2018.1.1")
                        .show();

            }
        });
        rl_tc.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                getActivity().finish();
            }
        });
        rl_top.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(getActivity(),Denglu.class);
                startActivity(intent);
            }
        });
    }

    private void setViews() {
        rl_bb=(RelativeLayout)view.findViewById(R.id.wd_rl_bb);
        rl_tc=(RelativeLayout)view.findViewById(R.id.wd_rl_tc);
        rl_top=(RelativeLayout)view.findViewById(R.id.wd_rl_top);
    }


}
